package com.huawei.Galenus.dao;

import com.huawei.Galenus.domain.SSA;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SSARepository {

    @Insert("insert into ssa(id,name,announcement,description) " +
            "values(#{id},#{name},#{announcement},#{description})")
    Integer save(SSA ssa);

    @Select("select * from ssa")
    List<SSA> selectAll();

    @Select("select * from ssa where id=#{uid}")
    SSA selectById(@Param("uid") String uid);
}
